﻿#ifndef USERCONTROLLER_H
#define USERCONTROLLER_H

#include <httpcontroller.h>
using namespace stefanfrings;

class UserController : public HttpController
{
public:
    UserController(QObject *parent = nullptr);
    ~UserController();
    void route(QString path, QString method, HttpRequest &request, HttpResponse &response) override;

private:
    void getUserInfo(HttpRequest &request, HttpResponse &response);
    void getList(HttpRequest &request, HttpResponse &response);
    void saveOne(HttpRequest &request, HttpResponse &response, uint64_t id = 0);
    void deleteOne(uint64_t id, HttpResponse &response);
};

#endif // USERCONTROLLER_H
